package cn.wdm.ymcc.feign;

import cn.wdm.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "service-course",fallbackFactory = CourseFeignClientFallBackFactory.class)
public interface CourseFeignClient {
    /**
     * 在播放视频的页面校验有没有播放视频的权限
     * @param loginId
     * @param courseId
     * @return
     */
    @RequestMapping(value = "/courseUserLearn/{loginId}/{courseId}",method = RequestMethod.GET)
    JSONResult checkPlayVideoPermission(@PathVariable("loginId")Long loginId,@PathVariable("courseId")Long courseId);

    /**
     * 在订单微服务调用课程微服务。获取course+market
     * @param courseIds
     * @return
     */
    @RequestMapping(value="/course/info/{courseId}",method= RequestMethod.GET)
    JSONResult getCourseInfos(@PathVariable("courseId") String courseIds);
}
